var divHtml = "<div title='公告声明' data-options='closable:true' style='padding:10px'>"+
              "<div class='ggsm-wrap'><div class='ggsm-title'><h2 id='title'></h2>"+
              "<div class='time-show'><span id='publishTime'></span><span id='authorName'></span></div>"+
              "</div><div id='content' class='ggsm-con'><p><img  alt=''/></p></div></div></div>";

//查看公告
function see(id){
    console.log(id);
    uceAjax(G_CTX_PATH+'/cs/CsSmNotice/CsSmNoticeView.do', {
        id : id
    }, function(data) {
        getContent(data);//获取公告详情页
    });
    var title = '公告详情页';
    // openDialog("dlCsSmNotice", '公告详情页');

    $('#dlCsSmNotice').dialog({
        title: title,
        align : 'center',
        // 弹框top=滚动条到页面顶部的距离+（页面显示的高度-弹框的高度）/2
        top:$(document).scrollTop()+($(window).height()-450)*0.5,
        cache: false,
        modal: true,
    });
    $('#dlCsSmNotice').dialog('open');
}

$(function () {

});

$('#dlCsSmNotice').dialog({//关闭窗口时触发关闭事件

});

//获取公告详情页
function getContent(data) {
    $("#dlCsSmNotice").html(divHtml);
    $("#title").text(data.title);
    var formatDate = formatTime(data.publishTime)
    $("#publishTime").text(formatDate);
    var authorName = data.authorName == null ? '':data.authorName;
    var au ="作者:"+ authorName;
    $("#authorName").text(au);
    var content = data.content;
    var html = content + "<p><img id='image' alt='' /></p>";
    $("#content").html(html);
    var src = G_CTX_PATH+'/uce/images/ys_logo.jpg'
    $("#image").attr("src",src);
}